Optimal. Leaf size=143 \[ \frac {(-b e g+c d g+c e f)^2}{c^2 g^3 (2 c f-b g) (-b g+c f-c g x)}+\frac {(-b e g-c d g+3 c e f) (-b e g+c d g+c e f) \log (-b g+c f-c g x)}{c^2 g^3 (2 c f-b g)^2}+\frac {(e f-d g)^2 \log (f+g x)}{g^3 (2 c f-b g)^2} \]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 143, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {798, 88} \begin {gather*} \frac {(-b e g+c d g+c e f)^2}{c^2 g^3 (2 c f-b g) (-b g+c f-c g x)}+\frac {(-b e g-c d g+3 c e f) (-b e g+c d g+c e f) \log (-b g+c f-c g x)}{c^2 g^3 (2 c f-b g)^2}+\frac {(e f-d g)^2 \log (f+g x)}{g^3 (2 c f-b g)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 88
Rule 798
Rubi steps
\begin {align*} \int \frac {(d+e x)^2 (f+g x)}{\left (c f^2-b f g-b g^2 x-c g^2 x^2\right )^2} \, dx &=\int \frac {(d+e x)^2}{(f+g x) \left (\frac {c f^2-b f g}{f}-c g x\right )^2} \, dx\\ &=\int \left (\frac {(-e f+d g)^2}{g^2 (-2 c f+b g)^2 (f+g x)}+\frac {(3 c e f-c d g-b e g) (-c e f-c d g+b e g)}{c g^2 (2 c f-b g)^2 (c f-b g-c g x)}+\frac {(c e f+c d g-b e g)^2}{c g^2 (2 c f-b g) (-c f+b g+c g x)^2}\right ) \, dx\\ &=\frac {(c e f+c d g-b e g)^2}{c^2 g^3 (2 c f-b g) (c f-b g-c g x)}+\frac {(e f-d g)^2 \log (f+g x)}{g^3 (2 c f-b g)^2}+\frac {(3 c e f-c d g-b e g) (c e f+c d g-b e g) \log (c f-b g-c g x)}{c^2 g^3 (2 c f-b g)^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 153, normalized size = 1.07 \begin {gather*} \frac {\frac {\left (b^2 e^2 g^2-4 b c e^2 f g+c^2 \left (-d^2 g^2+2 d e f g+3 e^2 f^2\right )\right ) \log (-b g+c f-c g x)}{c^2 (b g-2 c f)^2}+\frac {(-b e g+c d g+c e f)^2}{c^2 (2 c f-b g) (c (f-g x)-b g)}+\frac {(e f-d g)^2 \log (f+g x)}{(b g-2 c f)^2}}{g^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(d+e x)^2 (f+g x)}{\left (c f^2-b f g-b g^2 x-c g^2 x^2\right )^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 448, normalized size = 3.13 \begin {gather*} \frac {2 \, c^{3} e^{2} f^{3} + {\left (4 \, c^{3} d e - 5 \, b c^{2} e^{2}\right )} f^{2} g + 2 \, {\left (c^{3} d^{2} - 3 \, b c^{2} d e + 2 \, b^{2} c e^{2}\right )} f g^{2} - {\left (b c^{2} d^{2} - 2 \, b^{2} c d e + b^{3} e^{2}\right )} g^{3} + {\left (3 \, c^{3} e^{2} f^{3} + {\left (2 \, c^{3} d e - 7 \, b c^{2} e^{2}\right )} f^{2} g - {\left (c^{3} d^{2} + 2 \, b c^{2} d e - 5 \, b^{2} c e^{2}\right )} f g^{2} + {\left (b c^{2} d^{2} - b^{3} e^{2}\right )} g^{3} - {\left (3 \, c^{3} e^{2} f^{2} g + 2 \, {\left (c^{3} d e - 2 \, b c^{2} e^{2}\right )} f g^{2} - {\left (c^{3} d^{2} - b^{2} c e^{2}\right )} g^{3}\right )} x\right )} \log \left (c g x - c f + b g\right ) + {\left (c^{3} e^{2} f^{3} - b c^{2} d^{2} g^{3} - {\left (2 \, c^{3} d e + b c^{2} e^{2}\right )} f^{2} g + {\left (c^{3} d^{2} + 2 \, b c^{2} d e\right )} f g^{2} - {\left (c^{3} e^{2} f^{2} g - 2 \, c^{3} d e f g^{2} + c^{3} d^{2} g^{3}\right )} x\right )} \log \left (g x + f\right )}{4 \, c^{5} f^{3} g^{3} - 8 \, b c^{4} f^{2} g^{4} + 5 \, b^{2} c^{3} f g^{5} - b^{3} c^{2} g^{6} - {\left (4 \, c^{5} f^{2} g^{4} - 4 \, b c^{4} f g^{5} + b^{2} c^{3} g^{6}\right )} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.17, size = 297, normalized size = 2.08 \begin {gather*} -\frac {{\left (c^{2} d^{2} g^{2} - 2 \, c^{2} d f g e - 3 \, c^{2} f^{2} e^{2} + 4 \, b c f g e^{2} - b^{2} g^{2} e^{2}\right )} \log \left ({\left | c g x - c f + b g \right |}\right )}{4 \, c^{4} f^{2} g^{3} - 4 \, b c^{3} f g^{4} + b^{2} c^{2} g^{5}} + \frac {{\left (d^{2} g^{2} - 2 \, d f g e + f^{2} e^{2}\right )} \log \left ({\left | g x + f \right |}\right )}{4 \, c^{2} f^{2} g^{3} - 4 \, b c f g^{4} + b^{2} g^{5}} - \frac {2 \, c^{3} d^{2} f g^{2} - b c^{2} d^{2} g^{3} + 4 \, c^{3} d f^{2} g e - 6 \, b c^{2} d f g^{2} e + 2 \, b^{2} c d g^{3} e + 2 \, c^{3} f^{3} e^{2} - 5 \, b c^{2} f^{2} g e^{2} + 4 \, b^{2} c f g^{2} e^{2} - b^{3} g^{3} e^{2}}{{\left (c g x - c f + b g\right )} {\left (2 \, c f - b g\right )}^{2} c^{2} g^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 449, normalized size = 3.14 \begin {gather*} \frac {b^{2} e^{2} \ln \left (c g x +b g -c f \right )}{\left (b g -2 c f \right )^{2} c^{2} g}-\frac {4 b \,e^{2} f \ln \left (c g x +b g -c f \right )}{\left (b g -2 c f \right )^{2} c \,g^{2}}+\frac {d^{2} \ln \left (g x +f \right )}{\left (b g -2 c f \right )^{2} g}-\frac {d^{2} \ln \left (c g x +b g -c f \right )}{\left (b g -2 c f \right )^{2} g}-\frac {2 d e f \ln \left (g x +f \right )}{\left (b g -2 c f \right )^{2} g^{2}}+\frac {2 d e f \ln \left (c g x +b g -c f \right )}{\left (b g -2 c f \right )^{2} g^{2}}+\frac {e^{2} f^{2} \ln \left (g x +f \right )}{\left (b g -2 c f \right )^{2} g^{3}}+\frac {3 e^{2} f^{2} \ln \left (c g x +b g -c f \right )}{\left (b g -2 c f \right )^{2} g^{3}}+\frac {b^{2} e^{2}}{\left (b g -2 c f \right ) \left (c g x +b g -c f \right ) c^{2} g}-\frac {2 b d e}{\left (b g -2 c f \right ) \left (c g x +b g -c f \right ) c g}-\frac {2 b \,e^{2} f}{\left (b g -2 c f \right ) \left (c g x +b g -c f \right ) c \,g^{2}}+\frac {d^{2}}{\left (b g -2 c f \right ) \left (c g x +b g -c f \right ) g}+\frac {2 d e f}{\left (b g -2 c f \right ) \left (c g x +b g -c f \right ) g^{2}}+\frac {e^{2} f^{2}}{\left (b g -2 c f \right ) \left (c g x +b g -c f \right ) g^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.65, size = 268, normalized size = 1.87 \begin {gather*} \frac {{\left (3 \, c^{2} e^{2} f^{2} + 2 \, {\left (c^{2} d e - 2 \, b c e^{2}\right )} f g - {\left (c^{2} d^{2} - b^{2} e^{2}\right )} g^{2}\right )} \log \left (c g x - c f + b g\right )}{4 \, c^{4} f^{2} g^{3} - 4 \, b c^{3} f g^{4} + b^{2} c^{2} g^{5}} + \frac {{\left (e^{2} f^{2} - 2 \, d e f g + d^{2} g^{2}\right )} \log \left (g x + f\right )}{4 \, c^{2} f^{2} g^{3} - 4 \, b c f g^{4} + b^{2} g^{5}} + \frac {c^{2} e^{2} f^{2} + 2 \, {\left (c^{2} d e - b c e^{2}\right )} f g + {\left (c^{2} d^{2} - 2 \, b c d e + b^{2} e^{2}\right )} g^{2}}{2 \, c^{4} f^{2} g^{3} - 3 \, b c^{3} f g^{4} + b^{2} c^{2} g^{5} - {\left (2 \, c^{4} f g^{4} - b c^{3} g^{5}\right )} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.73, size = 224, normalized size = 1.57 \begin {gather*} \frac {\ln \left (f+g\,x\right )\,\left (d^2\,g^2-2\,d\,e\,f\,g+e^2\,f^2\right )}{b^2\,g^5-4\,b\,c\,f\,g^4+4\,c^2\,f^2\,g^3}+\frac {b^2\,e^2\,g^2-2\,b\,c\,d\,e\,g^2-2\,b\,c\,e^2\,f\,g+c^2\,d^2\,g^2+2\,c^2\,d\,e\,f\,g+c^2\,e^2\,f^2}{c^2\,g^3\,\left (b\,g-2\,c\,f\right )\,\left (b\,g-c\,f+c\,g\,x\right )}+\frac {\ln \left (b\,g-c\,f+c\,g\,x\right )\,\left (c^2\,\left (-d^2\,g^2+2\,d\,e\,f\,g+3\,e^2\,f^2\right )+b^2\,e^2\,g^2-4\,b\,c\,e^2\,f\,g\right )}{c^2\,g^3\,{\left (b\,g-2\,c\,f\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________